package com.china.zhuoyue.ui.activity.user

import android.graphics.BitmapFactory
import android.view.View
import com.china.zhuoyue.R
import com.china.zhuoyue.databinding.ActivityInviteFriendsBinding
import com.china.zhuoyue.ui.base.BaseActivity
import com.china.zhuoyue.ui.ext.toastMessageLong
import com.qmstudio.dshop.utils.AlbumUtils

class InviteFriendsActivity : BaseActivity<ActivityInviteFriendsBinding>() {
    override fun initView() {
        bindViewClick(vb.buttonSaveToAlbum)
    }

    override fun onClick(v: View?) {
        when (v) {
            vb.buttonSaveToAlbum -> {
                vb.buttonSaveToAlbum.enable(false)
                AlbumUtils.saveBitmap(mThis, BitmapFactory.decodeResource(resources, R.mipmap.bg_invite_friends), "${System.currentTimeMillis()}.png")
                "保存成功,请去相册查看".toastMessageLong()
                vb.buttonSaveToAlbum.enable(true)
            }
        }
    }
}